import request from '@/utils/request'

export function list(query) {
    return request({
        url: '/juheAdmin/list',
        method: 'get',
        params: query
    })
}


export function add(type, data) {
    return request({
        url: '/juheAdmin/add/'+type,
        method: 'post',
        data: data
    })
}
export function edit(type, data) {
    return request({
        url: '/juheAdmin/edit/'+type,
        method: 'post',
        data: data
    })
}


export function findById(query) {
    return request({
        url: '/juheAdmin/findById',
        method: 'get',
        params: query
    })
}

export function refreshCacheAll(type) {
    return request({
        url: '/juheAdmin/refreshCacheAll/'+type,
        method: 'get',
        timeout: 1000 * 60
    })
}


export function refreshCacheSingle(type, query) {
    return request({
        url: '/juheAdmin/refreshCacheSingle/'+type,
        method: 'get',
        params: query
    })
}

export function clickOnTheSplitFace(query) {
    return request({
        url: '/juheAdmin/clickOnTheSplitFace',
        method: 'get',
        params: query,
        timeout: 1000 * 60
    })
}

export function getTodaySReport(query) {
    return request({
        url: '/juheAdmin/getTodaySReport',
        method: 'get',
        params: query,
        timeout: 1000 * 60
    })
}

